namespace NAct
{
	using System.Reflection;

	public static class MethodInfoScenarioExtensions
	{
		public static bool HasA<T>( this MethodInfo method )
		{
			return method.GetCustomAttributes( typeof( T ), false ).Length > 0;
		}

		public static T Get<T>( this MethodInfo method )
		{
			return (T) method.GetCustomAttributes( typeof( T ), false )[ 0 ];
		}
	}
}